<template>
	<view class="wrapper">
		<view class="erwei_box" @tap="copy">
			<view class="biger center">
				<view class="qrimg">
					<tki-qrcode ref="qrcode" class="user_erweima" size="286" :val="address" /></view>
			</view>
			<!-- <view class="tips cfff">{{ address }}</view> -->
			<view class="tips cfff">扫一扫上面的二维码图案或者复制地址转账。</view>
			
		</view>
		<view class="ailpaly">
		<text class="l">流水号：</text>
			<input class="in" v-model="alipaly" type="text" value="" placeholder="必须填写流水号" />
			<text class="l ls" @tap="alipalys">提交	</text>
		</view>
		<view class="alert_title f30 alert cfff">
			注意事项
		</view>
		<view class="alert_text alert">
			1：请勿向以上述地址充值任何非ERC20-USDT资产，否则资产将不可找回。
		</view>
		<view class="alert_text alert">
			2：USDT充值需要12个网络确认才能到账。
		</view>
		<view class="alert_text alert">
			3：最小充值金额：100 USDT，小于最小金额的充值不会上帐且无法退回。
		</view>
	</view>
</template>

<script>
import tkiQrcode from '@/components/tki-qrcode/tki-qrcode.vue';
import h5Copy from '@/common/h5-copy.js';
export default {
	data() {
		return {
			userinfo: '',
			address:'',
			alipaly:''
		};
	},
	components: { tkiQrcode },
	onLoad(e) {
		if(e!=undefined){
			this.address = e.address;
			let that = this;
			this.userinfo = uni.getStorageSync('userinfo');
		}else{
			uni.showToast({
				title: '地址异常'
			});
		}
		// let that = this;
		// this.userinfo = uni.getStorageSync('userinfo');
	},
onNavigationBarButtonTap(){
			window.location.reload()
		},
	methods: {
		copy() {
			let content = this.address; 
			const result = h5Copy(content);
			if (result === false) {
				uni.showToast({
					title: '不支持'
				});
			} else {
				uni.showToast({
					title: '复制成功',
					icon: 'none'
				});
			}
		},
		alipalys(){
			this.$ajax(
			'/bi/putRechargeInfo',
			{
				userId:uni.getStorageSync('userinfo').userId,
				txId:this.alipaly
			},
			'POST'
			).then(res=>{
			 this.$sToast(res.resultMsg)
			})
		}	
	}
};
</script>

<style lang="less">
.ailpaly {
	width: 100%;
	box-sizing: border-box;
	display: flex;
	height:80upx;
	align-items: center;
	padding: 20upx;
	justify-content: space-between;
	margin-top: 20upx;
	.l {
		color: #fff;
	}
	.ls {
		height: 100%;
		background: #00B34D;
		padding: 10upx;
		
	}
	.in {
		flex: 2;
		color: #fff;
		border-bottom: 1upx solid #fff;
	} 
}
	.alert_text{
		color:#FFA61E ;
	}
	.alert{
		padding: 6rpx 50rpx;
	}
	.alert_title{
		font-weight: bold;
		padding: 30rpx 50rpx 30rpx;
	}
.wrapper {
	background:#0E1B45;
}
.erwei_box {
	width: 670rpx;
	background: #3F4D63;
	box-shadow: 0rpx 0rpx 19rpx 1rpx rgba(225, 225, 225, 1);
	border-radius: 12rpx;
	margin: 181rpx 40rpx 0 40rpx;
	overflow: hidden;
}

.head_name {
	display: flex;
	flex-direction: row;
}
.qrimg {
	overflow: hidden;
	margin: 0 auto;
}
.head_name .user_head {
	width: 100rpx;
	height: 100rpx;
	border-radius: 50%;
	margin: 30rpx 30rpx 0 30rpx;
	overflow: hidden;
}

.head_name .user_name {
	display: block;
	height: 31rpx;
	font-size: 32rpx;
	font-weight: 500;
	color: rgba(51, 51, 51, 1);
	margin: 84rpx 0 0 0;
}
.biger {
	text-align: center;
}
.biger .user_erweima {
	width: 286rpx;
	height: 286rpx;
	margin: 81rpx 0 60rpx 0;
}

.tips {
	font-size: 28rpx;
	font-family: PingFang SC;
	font-weight: 500;
	color: #666666;
	text-align: center;
	margin-bottom: 30rpx;
	word-break: break-all;
	padding: 0 30rpx;
}
</style>
